<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
	<th:block th:include="include :: header('产品投产详情')" />
</head>
<body class="gray-bg">
     <input type="hidden" id="rowIds">
     <div class="container-div">
		<div class="row">
			<div class="col-sm-12 search-collapse" style="display: none;">
				<form id="form">
					<div class="select-list">
						<ul>
							<li>
								<label>开始时间：</label>
								<input type="text" class="input-sm" id="startDate" name="startDate" />
							</li>
							<li>
								<label>结束时间：</label>
								<input type="text" class="input-sm" id="endDate" name="endDate" />
							</li>
							<li>
								<label>产品名称：</label>
								<input type="text" class="input-sm" id="partId" name="partId"/>
							</li>
						</ul>
					</div>
				</form>
			</div>
			<div class="btn-group-sm" id="toolbar" role="group">
				<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="report:lotinoutcount:export">
					<i class="fa fa-download"></i> 导出
				</a>
			</div>
			<div class="col-sm-12 select-table table-striped">
				<table id="bootstrap-table"></table>
			</div>
		</div>
	</div>
    <div th:include="include :: footer"></div>
    <script th:inline="javascript">
		const prefix = ctx + "report/newlotstatistics";
        var datas = [[${@dict.getType('sys_normal_disable')}]];
		var startDate = [[${startDate}]];
		var endDate = [[${endDate}]];
		var partId = [[${partId}]];

		var columns = [
			{
				field: 'NO.',
				title: "序号",
				width: 100,
				formatter: function (value, row, index) {
					return $.table.serialNumber(index);
				}
			},
			{
				field : 'moId',
				title : '工单号'
			},
			{
				field : 'materialType',
				title : '产品类型'
			},
			{
				field : 'lotType',
				title : '批次类型'
			},
			{
				field : 'engineer',
				title : '产品负责人'
			},
			{
				field : 'partId',
				title : '产品名称'
			},
			{
				field : 'customerOrder',
				title : '客户订单'
			},
			{
				field: 'newLotDate',
				title: '投入时间'
			},
			{
				field: 'priority',
				title: '等级'
			},
			{
				field: 'planEndDate',
				title: '计划完成时间'
			},
			{
				field: 'mainQty',
				title: '数量'
			},
			{
				field: 'lotId',
				title: '批号'
			}
		];

        $(function() {
			$("#startDate").attr("value", startDate);
			$("#endDate").attr("value", endDate);
			$("#partId").attr("value", partId);
            var options = {
                url: prefix + "/newlotinfo",
				exportUrl: prefix + "/newlotinfo/export",
				showSearch: false,
				showRefresh: false,
				showToggle: false,
				showColumns: false,
				pagination: false,
				modalName: "产品投片详情",
				columns: columns
            };
            $.table.init(options);
        });
    </script>
</body>
</html>